package com.study.api;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;
import java.io.File;

/**
 * @author zhuzi
 * 2025/1/5 14:11
 */
@RestController
public class CronController {

    @PostConstruct
    //@Scheduled(cron = "0/1 * * * * ?")
    public void corn() {
        FileUtil.appendUtf8String(DateUtil.now() + "\n", new File("/Users/zhuzi/Downloads/cron.txt"));
    }
}
